const app = getApp()
Page({
  data: {
    // 可根据实际需求动态赋值
    customer: {
    },
  },
  onLoad(options) {
    console.log(options.id)
    this.getCustomerInfo(options.id)
  },
  getCustomerInfo(id) {
    app.axios('customer',
      {
        op: 'ajaxCustomerDetail',
        id: id
      }
    ).then(res => {
      console.log(res.item)
      this.setData({
        customer: res.item
      })
    })
  },
  onBack() {
    wx.navigateBack();
  },
  onEdit() {
    const id=this.data.customer.id
    app.navigateTo(`/pages/operation-center/add-customer/index?id=${id}`)
    // 跳转到编辑页面或弹窗
  }
});